package com.yxinsur.imc.business.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import com.yxinsur.imc.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yxinsur.imc.business.mapper.ImcFeeRateMapper;
import com.yxinsur.imc.business.domain.ImcFeeRate;
import com.yxinsur.imc.business.service.IImcFeeRateService;

/**
 * 险种产品基础手续费率Service业务层处理
 * 
 * @author imc
 * @date 2021-04-15
 */
@Service
public class ImcFeeRateServiceImpl extends ServiceImpl<ImcFeeRateMapper, ImcFeeRate> implements IImcFeeRateService
{
    @Autowired
    private ImcFeeRateMapper imcFeeRateMapper;

    /**
     * 查询险种产品基础手续费率列表
     * 
     * @param imcFeeRate 险种产品基础手续费率
     * @return 险种产品基础手续费率
     */
    @Override
    public List<ImcFeeRate> selectImcFeeRateList(ImcFeeRate imcFeeRate)
    {
        return imcFeeRateMapper.selectImcFeeRateList(imcFeeRate);
    }

    /**
     * 新增险种产品基础手续费率
     * 
     * @param imcFeeRate 险种产品基础手续费率
     * @return 结果
     */
    @Override
    public int insertImcFeeRate(ImcFeeRate imcFeeRate)
    {
        imcFeeRate.setCreateTime(DateUtils.getNowDate());
        return imcFeeRateMapper.insertImcFeeRate(imcFeeRate);
    }

    /**
     * 修改险种产品基础手续费率
     * 
     * @param imcFeeRate 险种产品基础手续费率
     * @return 结果
     */
    @Override
    public int updateImcFeeRate(ImcFeeRate imcFeeRate)
    {
        imcFeeRate.setUpdateTime(DateUtils.getNowDate());
        return imcFeeRateMapper.updateImcFeeRate(imcFeeRate);
    }
}
